<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
RobotAnimator
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="RobotAnimator";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RobotAnimator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../maze/gui/PrimaryFrame.LookAndFeelListener.html" title="class in maze.gui"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?maze/gui/RobotAnimator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="RobotAnimator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
maze.gui</FONT>
<BR>
Class RobotAnimator</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>maze.gui.RobotAnimator</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Runnable</DD>
</DL>
<HR>
<DL>
<DT><PRE>public final class <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.17"><B>RobotAnimator</B></A><DT>extends java.lang.Object<DT>implements java.lang.Runnable</DL>
</PRE>

<P>
Animates a MicroMouse robot against a maze view.
<P>

<P>
<DL>
<DT><B>Author:</B></DT>
  <DD>Luke Last</DD>
</DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Represents the possible states that a robot animator can be in.</TD>
</TR>
</TABLE>
&nbsp;<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#currentState">currentState</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The state that this animator is currently in.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.Runnable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#finishedCallback">finishedCallback</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A call back method which is run after the animator is stopped.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#movesPerStep">movesPerStep</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of frames of animation to display between steps.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.Thread</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#processingThread">processingThread</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The thread running our animation loop.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../maze/ai/RobotController.html" title="class in maze.ai">RobotController</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#robot">robot</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The controller used to simulate the AI algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#sleepTime">sleepTime</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The time to sleep between rendering frames.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../maze/gui/MazeView.html" title="class in maze.gui">MazeView</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#view">view</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the maze view that this animator is attached to and updates with each
 animation frame.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#RobotAnimator()">RobotAnimator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#accelerationTransform(double)">accelerationTransform</A></B>(double&nbsp;input)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transforms one fraction into another in a non-linear fashion to provide
 for acceleration and the deceleration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#getFPS()">getFPS</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum frames per second this animator is trying to put out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#getMovesPerStep()">getMovesPerStep</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the number of intermediate frames of animation that take place between
 each step of the robot.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#getState()">getState</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current state that this robot animator is in.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#run()">run</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This runs in a background thread and handles the animation loop.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#setFPS(int)">setFPS</A></B>(int&nbsp;framesPerSecond)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The animator will try and render at most this many frames per second.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#setMovesPerStep(int)">setMovesPerStep</A></B>(int&nbsp;movesPerStep)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#setState(maze.gui.RobotAnimator.AnimationStates)">setState</A></B>(<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A>&nbsp;state)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the state of this robot animator.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#setViewAttributes()">setViewAttributes</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads information from the AI algorithm in the controller to the view for
 drawing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../maze/gui/RobotAnimator.html#start(maze.gui.MazeView, maze.ai.RobotBase, java.lang.Runnable)">start</A></B>(<A HREF="../../maze/gui/MazeView.html" title="class in maze.gui">MazeView</A>&nbsp;mazeView,
           <A HREF="../../maze/ai/RobotBase.html" title="class in maze.ai">RobotBase</A>&nbsp;robotAlgorithm,
           java.lang.Runnable&nbsp;finishedCallback)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start and initialize this.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="view"><!-- --></A><H3>
view</H3>
<PRE>
private <A HREF="../../maze/gui/MazeView.html" title="class in maze.gui">MazeView</A> <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.23"><B>view</B></A></PRE>
<DL>
<DD>the maze view that this animator is attached to and updates with each
 animation frame.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="robot"><!-- --></A><H3>
robot</H3>
<PRE>
private <A HREF="../../maze/ai/RobotController.html" title="class in maze.ai">RobotController</A> <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.27"><B>robot</B></A></PRE>
<DL>
<DD>The controller used to simulate the AI algorithm.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="currentState"><!-- --></A><H3>
currentState</H3>
<PRE>
private volatile <A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A> <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.31"><B>currentState</B></A></PRE>
<DL>
<DD>The state that this animator is currently in.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="finishedCallback"><!-- --></A><H3>
finishedCallback</H3>
<PRE>
private java.lang.Runnable <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.35"><B>finishedCallback</B></A></PRE>
<DL>
<DD>A call back method which is run after the animator is stopped.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="sleepTime"><!-- --></A><H3>
sleepTime</H3>
<PRE>
private int <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.39"><B>sleepTime</B></A></PRE>
<DL>
<DD>The time to sleep between rendering frames.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="movesPerStep"><!-- --></A><H3>
movesPerStep</H3>
<PRE>
private int <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.44"><B>movesPerStep</B></A></PRE>
<DL>
<DD>Number of frames of animation to display between steps.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="processingThread"><!-- --></A><H3>
processingThread</H3>
<PRE>
private java.lang.Thread <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.49"><B>processingThread</B></A></PRE>
<DL>
<DD>The thread running our animation loop.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="RobotAnimator()"><!-- --></A><H3>
RobotAnimator</H3>
<PRE>
public <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.17"><B>RobotAnimator</B></A>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="start(maze.gui.MazeView, maze.ai.RobotBase, java.lang.Runnable)"><!-- --></A><H3>
start</H3>
<PRE>
public void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.57"><B>start</B></A>(<A HREF="../../maze/gui/MazeView.html" title="class in maze.gui">MazeView</A>&nbsp;mazeView,
                  <A HREF="../../maze/ai/RobotBase.html" title="class in maze.ai">RobotBase</A>&nbsp;robotAlgorithm,
                  java.lang.Runnable&nbsp;finishedCallback)</PRE>
<DL>
<DD>Start and initialize this.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mazeView</CODE> - The view to be controlled by this animator.<DD><CODE>robotAlgorithm</CODE> - The AI algorithm to use for the animation.<DD><CODE>finishedCallback</CODE> - This is called after the animation is stopped.</DL>
</DD>
</DL>
<HR>

<A NAME="run()"><!-- --></A><H3>
run</H3>
<PRE>
public void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.85"><B>run</B></A>()</PRE>
<DL>
<DD>This runs in a background thread and handles the animation loop.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="accelerationTransform(double)"><!-- --></A><H3>
accelerationTransform</H3>
<PRE>
private double <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.186"><B>accelerationTransform</B></A>(double&nbsp;input)</PRE>
<DL>
<DD>Transforms one fraction into another in a non-linear fashion to provide
 for acceleration and the deceleration. If the input is a linear sequence
 the output will be a sequence that accelerates from 0 to .5 and the
 decelerates from .5 to 1.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - A value between 0 and 1.
<DT><B>Returns:</B><DD>A transformed value between 0 and 1.</DL>
</DD>
</DL>
<HR>

<A NAME="setViewAttributes()"><!-- --></A><H3>
setViewAttributes</H3>
<PRE>
private void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.207"><B>setViewAttributes</B></A>()</PRE>
<DL>
<DD>Loads information from the AI algorithm in the controller to the view for
 drawing.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getState()"><!-- --></A><H3>
getState</H3>
<PRE>
public <A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A> <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.216"><B>getState</B></A>()</PRE>
<DL>
<DD>Get the current state that this robot animator is in.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setState(maze.gui.RobotAnimator.AnimationStates)"><!-- --></A><H3>
setState</H3>
<PRE>
public void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.227"><B>setState</B></A>(<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui">RobotAnimator.AnimationStates</A>&nbsp;state)</PRE>
<DL>
<DD>Change the state of this robot animator. If the current state is
 <code>Stopped</code> you cannot change it here, you must use the
 <code>start(...)</code> method.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>state</CODE> - The new state you want to go to.</DL>
</DD>
</DL>
<HR>

<A NAME="getFPS()"><!-- --></A><H3>
getFPS</H3>
<PRE>
public int <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.243"><B>getFPS</B></A>()</PRE>
<DL>
<DD>The maximum frames per second this animator is trying to put out.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>FPS</DL>
</DD>
</DL>
<HR>

<A NAME="setFPS(int)"><!-- --></A><H3>
setFPS</H3>
<PRE>
public void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.251"><B>setFPS</B></A>(int&nbsp;framesPerSecond)</PRE>
<DL>
<DD>The animator will try and render at most this many frames per second.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getMovesPerStep()"><!-- --></A><H3>
getMovesPerStep</H3>
<PRE>
public int <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.260"><B>getMovesPerStep</B></A>()</PRE>
<DL>
<DD>Get the number of intermediate frames of animation that take place between
 each step of the robot.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setMovesPerStep(int)"><!-- --></A><H3>
setMovesPerStep</H3>
<PRE>
public void <A HREF="../../src-html/maze/gui/RobotAnimator.html#line.265"><B>setMovesPerStep</B></A>(int&nbsp;movesPerStep)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RobotAnimator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../maze/gui/PrimaryFrame.LookAndFeelListener.html" title="class in maze.gui"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../maze/gui/RobotAnimator.AnimationStates.html" title="enum in maze.gui"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?maze/gui/RobotAnimator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="RobotAnimator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
